<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>帮助中心</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <style media="screen">
        html,body{
          background-color: #fff;
        }
        .wrap {
            width: 100%;
            padding: 0 15px;
            overflow: hidden;
        }

        .wrap ul {
            width: 100%;
            overflow: hidden;
        }

        .wrap ul li {
            width: 100%;
            padding: 12px 0;
            font-size: 13px;
            font-family: PingFang SC;
            font-weight: 400;
            color: #333333;
            line-height: 13px;
            border: none;
            background-size: 100% 1px;
            background-repeat: no-repeat;
            background-position: bottom;
            background-image: linear-gradient(0, #EEEEEE, #EEEEEE 50%, transparent 50%);
            background-image: -webkit-linear-gradient(90deg, #EEEEEE, #EEEEEE 50%, transparent 50%);
            overflow: hidden;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="wrap">
            <ul>
                <li v-for='item in dataList' @click='openHelpDetailsPage(item.id)'>{{item.title}}</li>
            </ul>
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/cling.js"></script>
<script type="text/javascript">
    apiready = function() {
      console.log(api.pageParam.id);
      vm.init(api.pageParam.id)
    }
    var vm = new Vue({
        el: '#app',
        data: {
          dataList:[]
        },
        methods: {
            init:function(id){
              api.ajax({
                  url: cl.apiServer + 'helpContent/getHelpList',
                  method: 'post',
                  headers: {
                      'Content-Type': 'application/json;charset=utf-8',
                      token:cl.userToken
                  },
                  data: {
                      body: {
                          parentId:id,
                          version:cl.deviceInfo().appVersion,
                          mobileInfo:cl.systemType()
                      }
                  }
              }, function(ret, err) {
                  console.log(JSON.stringify(ret));
                  if (ret) {
                      if (ret.code == 0) {
                          vm.dataList = ret.data;
                      }
                  }
              });
            },
            openHelpDetailsPage:function(id){
              cl.openWin({
                name:'problems_details',
                pageParam:{
                  id:id
                }
              })
            }
        }
    });
</script>

</html>
